import React, { Component } from 'react'
import RouterView from '../router/routerView'
import { BrowserRouter as Router , withRouter } from 'react-router-dom'
import {connect} from 'react-redux'

export class Index extends Component {
    constructor(props){
        super(props)
        this.props.FooterShowTrue()
    }
    render() {
        let { routerConfig } = this.props
        let {isShow} = this.props
        return (
            <Router>
                <RouterView routerConfig={routerConfig} />
            </Router>
        )
    }
    
}
const mapStateToProps = (state)=>{
    return {
        isShow:state.footerShow
    }
}
const mapDispatchToProps = (dispatch)=>{
    return {
        FooterShowTrue : ()=>{ dispatch({type:'FST'}) }
    }
}
export default connect(mapStateToProps,mapDispatchToProps)(withRouter(Index))
